package com.china08.yxyapi.repository.db;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.china08.yxyapi.entity.db.res.YxyKnowledge;

public interface YxyKnowledgeRepository extends JpaRepository<YxyKnowledge, Integer> {

    /** 查询某个学段+学科下的知识点 */
    List<YxyKnowledge> findByStageAndSubjectAndDeleteFlag(String stage, String subject, String deleteFlag);

    /**
     * 级联查询知识点
     * 
     */
    List<YxyKnowledge> findByStageAndSubjectAndDeleteFlagAndParentId(String stage, String subject, String string,
            Integer pid);

    /**
     * 查询知识点
     */
    YxyKnowledge findById(Integer knowThreeId);

    List<YxyKnowledge> findByIdIn(List<Integer> ids);

    List<YxyKnowledge> findByParentId(Integer knowId);

    List<YxyKnowledge> findByParentIdIn(List<Integer> knowIds);

}
